<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<title>test dojo</title>
		<script type="text/javascript" src="http://192.168.1.175/dojo/dojo.js"></script>
		<script type="text/javascript">
			//<![CDATA[
			   
			    dojo.require("dojox.lang.functional");
			
				var df = dojox.lang.functional;
				values = [1,2,3,4,5];
				
				dojo.addOnLoad(function(){
					var a = df.scanl1([1, 2, 3], "*")
					log(a);
					var b = df.scanl1([1, 5, 3], "*")
					log(b);
					var c = df.scanl([1, 2, 3], "+", 2,3);
					log(c)
					var d= df.repeat(4, "*+","*****");
					log(d);
					var x  = {a: 1, b: 2, c: 3},
					print = function(v, i){ this.push("[" + i + "] = " + v); },
					show = function(o){ return df.forIn(o, print, [1,2,3]).sort().join(", "); };
					log(show(x))
					df.forIn(x,testMap);
					
				});
				function testMap(s1,s2) {
					log(s1+":"+s2);
					
				} // End of testMap
				function f1(str){
					
					log(str);
					return true;
				}
				function f2(str1,str2){
					var sum = str1+str2;
					alert(sum);
					return sum;
				}
				function testMinxin() {
					var d = dojo;
					var o = {
						name:'kang',
						age:21
					}
					d.mixin(df,o);
					alert(df.name);
				} // End of testMinxin
				function log(str){

						 dojo.byId('logInfo').innerHTML += str;
						 dojo.byId('logInfo').innerHTML += '<br/>';
				}
			//]]>
		</script>
	</head>
	<body>
		<div id="logInfo" class="log">

	  </div>
	</body>
</html>